package service

import (
	"context"
	"story/repo/dal"
	"story/repo/po"
)

type StoryService struct {
	storySceneImpl *dal.StorySceneImpl
	storyMateImpl  *dal.StoryMateImpl
	storyAction    *dal.StoryActionImpl
	storyChoice    *dal.StoryChoiceImpl
}

func NewStoryService(ctx context.Context) *StoryService {
	return &StoryService{
		storySceneImpl: dal.NewStorySceneImpl(ctx),
		storyMateImpl:  dal.NewStoryMateImpl(ctx),
		storyAction:    dal.NewStoryActionImpl(ctx),
		storyChoice:    dal.NewStoryChoiceImpl(ctx),
	}
}

func (s *StoryService) GetStories(ctx context.Context, pageSize, pageNum int) ([]*po.StoryMate, error) {
	ans := make([]*po.StoryMate, 0)

	ans = append(ans, &po.StoryMate{
		StoryId:        1,
		StoryName:      "1",
		StoryDesc:      "1",
		StoryTopic:     "1",
		StoryType:      1,
		StoryStatus:    1,
		StoryMainImg:   []string{"1111"},
		StoryDetailImg: []string{"1111"},
	})

	return ans, nil
}
